<!DOCTYPE html>
<html lang="zh" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('订单中所包含的商品列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <p>订单id：</p>
                            <input name="orderId" type="text"/>
                        </li>
                        <li>
                            <p>订单编号：</p>
                            <input name="orderSn" type="text"/>
                        </li>
                        <li>
                            <p>订单编号：</p>
                            <input name="productId" type="text"/>
                        </li>
                        <li>
                            <p>订单编号：</p>
                            <input name="productName" type="text"/>
                        </li>
                        <li>
                            <p>订单编号：</p>
                            <input name="productBrand" type="text"/>
                        </li>
                        <li>
                            <p>订单编号：</p>
                            <input name="productSn" type="text"/>
                        </li>
                        <li>
                            <p>销售价格：</p>
                            <input name="productPrice" type="text"/>
                        </li>
                        <li>
                            <p>购买数量：</p>
                            <input name="productQuantity" type="text"/>
                        </li>
                        <li>
                            <p>商品sku编号：</p>
                            <input name="productSkuId" type="text"/>
                        </li>
                        <li>
                            <p>商品sku条码：</p>
                            <input name="productSkuCode" type="text"/>
                        </li>
                        <li>
                            <p>商品分类id：</p>
                            <input name="productCategoryId" type="text"/>
                        </li>
                        <li>
                            <p>商品的销售属性：</p>
                            <input name="sp1" type="text"/>
                        </li>
                        <li>
                            <p>商品的销售属性：</p>
                            <input name="sp2" type="text"/>
                        </li>
                        <li>
                            <p>商品的销售属性：</p>
                            <input name="sp3" type="text"/>
                        </li>
                        <li>
                            <p>商品促销名称：</p>
                            <input name="promotionName" type="text"/>
                        </li>
                        <li>
                            <p>商品促销分解金额：</p>
                            <input name="promotionAmount" type="text"/>
                        </li>
                        <li>
                            <p>优惠券优惠分解金额：</p>
                            <input name="couponAmount" type="text"/>
                        </li>
                        <li>
                            <p>积分优惠分解金额：</p>
                            <input name="integrationAmount" type="text"/>
                        </li>
                        <li>
                            <p>该商品经过优惠后的分解金额：</p>
                            <input name="realAmount" type="text"/>
                        </li>
                        <li>
                            <p>该商品经过优惠后的分解金额：</p>
                            <input name="giftIntegration" type="text"/>
                        </li>
                        <li>
                            <p>该商品经过优惠后的分解金额：</p>
                            <input name="giftGrowth" type="text"/>
                        </li>
                        <li>
                            <p>所属店铺：</p>
                            <input name="storeId" type="text"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="mall:item:add">
                <i class="fa fa-plus"></i> 添加
            </a>
            <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="mall:item:edit">
                <i class="fa fa-edit"></i> 修改
            </a>
            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
               shiro:hasPermission="mall:item:remove">
                <i class="fa fa-remove"></i> 删除
            </a>
            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="mall:item:export">
                <i class="fa fa-download"></i> 导出
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table data-mobile-responsive="true" id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('mall:item:edit')}]];
    var removeFlag = [[${@permission.hasPermi('mall:item:remove')}]];
    var prefix = ctx + "mall/item";

    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "订单中所包含的商品",
            columns: [{
                checkbox: true
            },
                {
                    field: 'id',
                    title: '所属店铺',
                    visible: false
                },
                {
                    field: 'orderId',
                    title: '订单id'
                },
                {
                    field: 'orderSn',
                    title: '订单编号'
                },
                {
                    field: 'productId',
                    title: '订单编号'
                },
                {
                    field: 'productPic',
                    title: '订单编号'
                },
                {
                    field: 'productName',
                    title: '订单编号'
                },
                {
                    field: 'productBrand',
                    title: '订单编号'
                },
                {
                    field: 'productSn',
                    title: '订单编号'
                },
                {
                    field: 'productPrice',
                    title: '销售价格'
                },
                {
                    field: 'productQuantity',
                    title: '购买数量'
                },
                {
                    field: 'productSkuId',
                    title: '商品sku编号'
                },
                {
                    field: 'productSkuCode',
                    title: '商品sku条码'
                },
                {
                    field: 'productCategoryId',
                    title: '商品分类id'
                },
                {
                    field: 'sp1',
                    title: '商品的销售属性'
                },
                {
                    field: 'sp2',
                    title: '商品的销售属性'
                },
                {
                    field: 'sp3',
                    title: '商品的销售属性'
                },
                {
                    field: 'promotionName',
                    title: '商品促销名称'
                },
                {
                    field: 'promotionAmount',
                    title: '商品促销分解金额'
                },
                {
                    field: 'couponAmount',
                    title: '优惠券优惠分解金额'
                },
                {
                    field: 'integrationAmount',
                    title: '积分优惠分解金额'
                },
                {
                    field: 'realAmount',
                    title: '该商品经过优惠后的分解金额'
                },
                {
                    field: 'giftIntegration',
                    title: '该商品经过优惠后的分解金额'
                },
                {
                    field: 'giftGrowth',
                    title: '该商品经过优惠后的分解金额'
                },
                {
                    field: 'productAttr',
                    title: '商品销售属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}]'
                },
                {
                    field: 'storeId',
                    title: '所属店铺'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>
